* lisp/xml.el: Handle entity and character reference expansion correctly.
authorChong Yidong <cyd@gnu.org>
Mon, 2 Jul 2012 16:21:54 +0000 (00:21 +0800)
committerChong Yidong <cyd@gnu.org>
Mon, 2 Jul 2012 16:21:54 +0000 (00:21 +0800)
commitc2e83136c03e40b9d7ab995a8dcacd8c3c3eb82a
treeaa7095ba707721cb295cd8ae47802f417e24825b
parent85b15708178251d574e8a9124fc7696653641782
* lisp/xml.el: Handle entity and character reference expansion correctly.
(xml-default-ns): New variable.
(xml-entity-alist): Use XML spec definitions for lt and amp.
(xml-parse-region): Make first two arguments optional.  Discard
text properties.
(xml-parse-tag-1): New function, spun off from xml-parse-tag.  All
callers changed.
(xml-parse-tag): Call xml-parse-tag-1.  For backward
compatibility, this function should not modify buffer contents.
(xml-parse-tag-1): Fix opening-tag regexp.
(xml-parse-string): Rewrite, handling entity and character
references properly.
(xml--entity-replacement-text): Signal an error if a parameter
entity is undefined.

* test/automated/xml-parse-tests.el (xml-parse-tests--data): More
testcases.
lisp/ChangeLog
lisp/xml.el
test/ChangeLog
test/automated/xml-parse-tests.el